The implementations disclosed herein relate generally to database systems and more particularly to query optimization systems and methods for use with multi-tenant database systems (“MTS”).
In order to access, retrieve, and process stored data in a database system, a query is generated, automatically or manually, in accordance with the application program interface protocol for the database. In the case of a relational database, the standard protocol is structured query language (“SQL”). SQL is used both for interactive queries to access data in the database and for gathering data and metadata, including statistics. The data access path may determine the order in which tables are retrieved—in the case of table joins, the data access path can have a profound impact on overall query performance. When the data access path is efficient, the amount of data that must be read from disk and the number of required disk accesses are minimized, thus improving overall performance (particularly where disk access is a slow operation). The efficiency of the data access path underlying the actual query is dependent in part on the size and complexity of the data structure scheme of the database and in part on the query logic used.
Accordingly, it is desirable to provide systems and methods for providing more efficient database queries.